#ifndef Delegate1_H
#define Delegate1_H

#include "Global_Signal.h"
#include "abstractDelegate.h"

template <class T, class U>
class Delegate1 : public AbstractDelegate
{
    public :

    T * objetDelegate;
    int (T::*pDelegate)(U);

    Delegate1(int (T::*aPDelegate)(U), T * ref);

    virtual void Run();

    template<class T>
     virtual  void Run(T arg)=0;

    template<class T, class U>
     virtual  void Run(T arg, U arg2)=0;

    template<class T, class U, class W>
     virtual  void Run(T arg, U arg2, W arg3)=0;

};


template <class T, class U>
Delegate1<T,U>::Delegate1(int (T::*apDelegate)(U),T * ref)
{
        pDelegate=apDelegate;
        objetDelegate=ref;
}


template<class T, class U>
void Delegate1<T,U>::Run(U arg)
{
    (objetDelegate->*pDelegate)(arg);
}

#endif // Delegate1_H
